/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.system.service.api;


import com.koron.common.domain.DataBean;
import com.koron.system.domain.OnlineLog;
import com.koron.system.domain.OperationLog;
import com.koron.system.domain.SigninLog;

import java.util.Date;
import java.util.List;

public interface LogService {

    /**
     * fetch all operation logs in the given condition
     * @param businessManipulation
     * @param operatorName
     * @param orgName
     * @param businessModule
     * @param beginTime
     * @param endTime
     * @param start
     * @param rows
     * @return
     */
    DataBean<OperationLog> fetchOperationLog(Integer businessManipulation, String operatorName,String orgName,String businessModule,
                                             Date beginTime, Date endTime, Integer start, Integer rows) throws Exception;


    /**
     * query the one whose id is the given
     * @param id
     * @param operationTime
     * @return
     * @throws Exception
     */
    OperationLog fetchOneOperationLog(String id, Date operationTime) throws Exception;


    /**
     * delete operation log in batch
     * @param operationLogs
     * @return
     */
    Boolean batchDeteleOperationLog(List<OperationLog> operationLogs) throws Exception;

    /**
     * write signin log
     * @return
     * @throws Exception
     */
    Boolean signinLog() throws Exception;


    /**
     * fetch all signin logs in the given condition
     * @param signinName
     * @param browser
     * @param beginTime
     * @param endTime
     * @param start
     * @param rows
     * @return
     * @throws Exception
     */
    DataBean<SigninLog> fetchSigninLog(String signinName, String browser,
                                       Date beginTime, Date endTime, Integer start, Integer rows, String orgName, String deptName) throws Exception;


    /**
     * query the one whose id is the given
     * @param id
     * @return
     * @throws Exception
     */
    SigninLog fetchOneSigninLog(String id) throws Exception;


    /**
     * delete signin log in batch
     * @param idList
     * @return
     */
    Boolean batchDeteleSigninLog(List<String> idList) throws Exception;


    /**
     * fetch all online logs in the given condition
     * @param loginName
     * @param deptName
     * @param browser
     * @param status
     * @param start
     * @param rows
     * @return
     * @throws Exception
     */
    DataBean<OnlineLog> fetchOnlineLog(String loginName, String deptName, String browser,
                                       Integer status, Integer start, Integer rows) throws Exception;


    /**
     * query the one whose id is the given
     * @param id
     * @return
     * @throws Exception
     */
    OnlineLog fetchOneOnlineLog(String id) throws Exception;


    /**
     * delete online log in batch
     * @param idList
     * @return
     */
    Boolean batchDeteleOnlineLog(List<String> idList) throws Exception;


}
